//
// Created by deepin on 2020/11/12.
//

#ifndef C___STOCK10_H
#define C___STOCK10_H
#include <string>
#include "stock00.h"

class Stock1
{
   private:
     std::string company;
     long shares;
     double share_val;
     double total_val;
     void set_tot() {total_val = shares*share_val;}

   public:
     Stock1 (); // 默认构造函数
     Stock1 (const std::string & co , long n = 0 ,double pr =0.0); // 有参构造函数
     ~Stock1(); // 析构函数
     void buy (long num , double price);
     void sell (long num , double price);
     void update(double price);
     void show();
};


#endif //C___STOCK10_H
